"use strict";
(function() {
	if (!document.getElementsByClassName) {
		var indexOf = [].indexOf || function(prop) {
			for ( var i = 0; i < this.length; i++) {
				if (this[i] === prop)
					return i;
			}
			return -1;
		};
		getElementsByClassName = function(className, context) {
			var elems = document.querySelectorAll ? context.querySelectorAll("." + className) : (function() {
				var all = context.getElementsByTagName("*"), elements = [], i = 0;
				for (; i < all.length; i++) {
					if (all[i].className && (" " + all[i].className + " ").indexOf(" " + className + " ") > -1 && indexOf.call(elements, all[i]) === -1)
						elements.push(all[i]);
				}
				return elements;
			})();
			return elems;
		};
		document.getElementsByClassName = function(className) {
			return getElementsByClassName(className, document);
		};
	 
	}
})();

if (!Function.prototype.bind) {
	Function.prototype.bind = function(obj) {
		var _self = this, args = arguments;
		return function() {
			_self.apply(obj, Array.prototype.slice.call(args, 1));
		}
	}
}
if (!Array.prototype.forEach) {
	Array.prototype.forEach = function(fun /* , thisp */) {
		var len = this.length;
		if (typeof fun != "function")
			throw new TypeError();

		var thisp = arguments[1];
		for ( var i = 0; i < len; i++) {
			if (i in this)
				fun.call(thisp, this[i], i, this);
		}
	};
}
